import request from '@/utils/request'

// 查询用户好友列表
export function listChatContact(query) {
  return request({
    url: '/business/chatContact/list',
    method: 'get',
    params: query
  })
}

// 查询用户好友详细
export function getChatContact(id) {
  return request({
    url: '/business/chatContact/' + id,
    method: 'get'
  })
}

// 新增用户好友
export function addChatContact(data) {
  return request({
    url: '/business/chatContact',
    method: 'post',
    data: data
  })
}

// 修改用户好友
export function updateChatContact(data) {
  return request({
    url: '/business/chatContact',
    method: 'put',
    data: data
  })
}

// 删除用户好友
export function delChatContact(id) {
  return request({
    url: '/business/chatContact/' + id,
    method: 'delete'
  })
}

// 批量添加好友
export function addContacts(data) {
  return request({
    url: '/business/chatContact/add',
    method: 'post',
    data: data
  })
}